import {getGoods} from "http"
export default {
    state:{
        goods:{}//获取所有商品数据

    },
    mutations:{
      getGoods(state,goods){
          state.goods = goods;
      }
    },
    actions:{
      async getGoods({commit},options){
          const {code,data} = await getGoods(options)
          if(code === 200){
              commit("getGoods",data)
          }
      }
    }
}